﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using DTO;

namespace DAO
{
    public partial class GiamGia_DAO
    {
        public DataTable getDanhSachTiLeGiam()
        {
            DataProvider dp = new DataProvider();
            DataTable dt = new DataTable();
            dt = dp.ExecuteQuery("sp_getDanhSachGiamGia");
            return dt;
        }

        public DataTable getPhanTramGiamGia(float diemtichluy)
        {
            DataProvider dp = new DataProvider();
            DataTable dt = new DataTable();
            SqlParameter[] Parameter = new SqlParameter[1];

            Parameter[0] = new SqlParameter("@diemtichluy", diemtichluy);
            
            dt = dp.ExecuteQuery("sp_getPhanTramGiamGia", Parameter);
            return dt;
        }
    }
}
